package xml;

import xml.elements.DataItem;
import xml.elements.DataItemInput;
import xml.elements.DataItemSet;
import xml.elements.DataItemSetInput;
import xml.elements.EnumeratedUserInput;
import xml.elements.LogicalOperatorUserInput;
import xml.elements.OptionalDataItemInput;
import xml.elements.OptionalDataItemSetInput;
import xml.elements.OptionalEnumeratedUserInput;
import xml.elements.OptionalLogicalOperatorUserInput;
import xml.elements.OptionalStructureInput;
import xml.elements.OptionalStructureSetInput;
import xml.elements.Structure;
import xml.elements.StructureInput;
import xml.elements.StructureSet;
import xml.elements.StructureSetInput;
import xml.elements.SubState;
import xml.elements.Text;

public abstract class ScannerSubStateAbstract {

	protected void scanSubState(SubState s) {

		for (Object o : s.getInputsOrOutputsOrTexts()) {

			Class<? extends Object> co = o.getClass();

			if (co.equals(DataItem.class)) {

				dataItemFound((DataItem) o);
				continue;
			}

			if (co.equals(DataItemSet.class)) {

				dataItemSetFound((DataItemSet) o);
				continue;
			}

			if (co.equals(DataItemInput.class)) {

				dataItemInputFound((DataItemInput) o);
				continue;
			}

			if (co.equals(DataItemSetInput.class)) {

				dataItemSetInputFound((DataItemSetInput) o);
				continue;
			}

			if (co.equals(Structure.class)) {

				structureFound((Structure) o);
				continue;
			}

			if (co.equals(StructureSet.class)) {

				structureSetFound((StructureSet) o);
				continue;
			}

			if (co.equals(StructureInput.class)) {

				structureInputFound((StructureInput) o);
				continue;
			}

			if (co.equals(StructureSetInput.class)) {

				structureSetInputFound((StructureSetInput) o);
				continue;
			}

			if (co.equals(EnumeratedUserInput.class)) {

				enumeratedUserInputFound((EnumeratedUserInput) o);
				continue;
			}

			if (co.equals(LogicalOperatorUserInput.class)) {

				logicalOperatorUserInputFound((LogicalOperatorUserInput) o);
				continue;
			}

			if (co.equals(OptionalDataItemInput.class)) {

				optionalDataItemInputFound((OptionalDataItemInput) o);
				continue;
			}

			if (co.equals(OptionalDataItemSetInput.class)) {

				optionalDataItemSetInputFound((OptionalDataItemSetInput) o);
				continue;
			}

			if (co.equals(OptionalStructureInput.class)) {

				optionalStructureInputFound((OptionalStructureInput) o);
				continue;
			}

			if (co.equals(OptionalStructureSetInput.class)) {

				optionalStructureSetInputFound((OptionalStructureSetInput) o);
				continue;
			}

			if (co.equals(OptionalEnumeratedUserInput.class)) {

				optionalEnumeratedUserInputFound((OptionalEnumeratedUserInput) o);
				continue;
			}

			if (co.equals(OptionalLogicalOperatorUserInput.class)) {

				optionalLogicalOperatorUserInputFound((OptionalLogicalOperatorUserInput) o);
				continue;
			}

			if (co.equals(Text.class)) {

				textFound((Text) o);
				continue;
			}

		}

	}

	protected abstract void textFound(Text o);

	protected abstract void optionalLogicalOperatorUserInputFound(
			OptionalLogicalOperatorUserInput o);

	protected abstract void optionalEnumeratedUserInputFound(
			OptionalEnumeratedUserInput o);

	protected abstract void optionalStructureSetInputFound(
			OptionalStructureSetInput o);

	protected abstract void optionalStructureInputFound(OptionalStructureInput o);

	protected abstract void optionalDataItemSetInputFound(
			OptionalDataItemSetInput o);

	protected abstract void optionalDataItemInputFound(OptionalDataItemInput o);

	protected abstract void logicalOperatorUserInputFound(
			LogicalOperatorUserInput o);

	protected abstract void enumeratedUserInputFound(EnumeratedUserInput o);

	protected abstract void structureSetInputFound(StructureSetInput o);

	protected abstract void structureInputFound(StructureInput o);

	protected abstract void dataItemSetInputFound(DataItemSetInput o);

	protected abstract void dataItemInputFound(DataItemInput o);

	protected abstract void structureSetFound(StructureSet o);

	protected abstract void structureFound(Structure o);

	protected abstract void dataItemSetFound(DataItemSet o);

	protected abstract void dataItemFound(DataItem o);

}